import openpyxl

#读取Excel文件
workbook = openpyxl.load_workbook("测试.xlsx")
sheet = workbook["Sheet1"]

#获取单元格数据
value = sheet['A1'].value
print(value)

value = sheet['B1'].value
print(value)